void CMainFrame::OnDeleteMenu() 
{
	// TODO: Add your command handler code here
	CMenu *pMenuDyna = NULL;
	CMenu *pMenu=NULL;
	CMenu *pTopMenu = GetMenu();
	int iPos;
	for(iPos=pTopMenu->GetMenuItemCount()-1; iPos>=0; iPos--)
	{
		pMenu=pTopMenu->GetSubMenu(iPos);
		if(pMenu && pMenu->GetMenuItemID(0)==ID_DRAW_RECT)
		{
			pMenuDyna=pMenu;
			break;
		}
	}
	for(iPos=pMenuDyna->GetMenuItemCount()-1; iPos>=5; iPos--)
		pMenuDyna->DeleteMenu(iPos,MF_BYPOSITION);	
}
